name = input('please enter your name: ')#输入语句
print('hello,', name) #输出语句

#数据类型
a = 15; #int 
b = 15.16; #float
c = "abc"; #str
c = '''ab #带换行符号的str
cd'''; 
d = False; #bollean


#占位符
# %d	整数
# %f	浮点数
# %s	字符串
# %x	十六进制整数
# %%    %

'Hello, %s' % 'world'#'Hello, world' %之后为占位符的填充内容
'Hi, %s, you have $%d.' % ('Michael', 1000000)#'Hi, Michael, you have $1000000.'

print('%2d-%02d' % (3, 1))#两位整数,整数前添0
print('%.2f' % 3.1415926)#两位小数

#format()占位
#{0},{1}...
'Hello, {0}, 成绩提升了 {1:.1f}%'.format('小明', 17.125)
'Hello, 小明, 成绩提升了 17.1%'
#f-string方法
r = 2.5
s = 3.14 * r ** 2
#前提是先有r和s
print(f'The area of a circle with radius {r} is {s:.2f}')#The area of a circle with radius 2.5 is 19.62

r =(85-72)/72*100
print('小明成绩提升了%.1f%%' % r)

